VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmContratosEmpleados 
   BackColor       =   &H00400000&
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Contratos del Asesor Seleccionado"
   ClientHeight    =   5100
   ClientLeft      =   30
   ClientTop       =   300
   ClientWidth     =   8550
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   Picture         =   "frmContratosEmpleados.frx":0000
   ScaleHeight     =   5100
   ScaleWidth      =   8550
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton CmdSalir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   7560
      Picture         =   "frmContratosEmpleados.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   4320
      Width           =   732
   End
   Begin MSDataGridLib.DataGrid GrdDetalle 
      Height          =   3492
      Left            =   240
      Negotiate       =   -1  'True
      TabIndex        =   1
      Top             =   720
      Width           =   8052
      _ExtentX        =   14208
      _ExtentY        =   6165
      _Version        =   393216
      AllowUpdate     =   -1  'True
      AllowArrows     =   -1  'True
      BackColor       =   12648447
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "CONTRATOS"
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2058
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2058
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.Label Label1 
      BackColor       =   &H00400000&
      Caption         =   "Contratos del Asesor"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   372
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   3972
   End
End
Attribute VB_Name = "frmContratosEmpleados"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdSalir_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    PrepararGrid
    Left = Screen.Width / 2 - Width / 2
    Top = (Screen.Height / 2 - Height / 2) - 800
    
    codigoEmpleado = Vcodigo
    If DE.rsConsultarContratosEmpleados.State = adStateOpen Then DE.rsConsultarContratosEmpleados.Close
    DE.ConsultarContratosEmpleados codigoEmpleado, PeriodoPublico
    
    
    If DE.rsConsultarContratosEmpleados.EOF Then
        GrdDetalle.ClearFields
        Exit Sub
    End If
    
    With GrdDetalle
        Set .DataSource = DE
            .DataMember = "ConsultarContratosEmpleados"
            .Columns(0).Width = 0
        'Alinear a la derecha las columna con datos numericos
        '.Columns(1).Alignment = dbgRight
        .Col = 0
    End With

End Sub


Private Sub PrepararGrid()
    With GrdDetalle
        .Columns(0).Width = 0
        .Columns(1).Width = 0

    End With
    
End Sub

Private Sub GrdDetalle_DblClick()
 On Error Resume Next
 '   Vcodigo = ""
    GrdDetalle.Col = 1
    Vcodigo2 = GrdDetalle.Text
    If Vcodigo2 = "" Then Exit Sub
    frmModificacionContrato.Show 1
End Sub
